package com.kh.pajx.sop.util.security.userdetails;

import java.io.Serializable;


/**
 * 提供用户核心信息接口
 * @author:	azzcsimp
 * @Createdate:	2014年12月16日 下午3:29:08
 */
public interface UserDetails extends Serializable {
	
	/**
	 * Returns the password used to authenticate the user. 
	 * Cannot return <code>null</code>.
	 * @return the password (never <code>null</code>)
	 * @author:	azzcsimp
	 * @Createdate:	2014年12月16日 下午3:32:37
	 */
	String getPassword();
	
	/**
	 * Returns the username used to authenticate the user. 
	 * Cannot return <code>null</code>.
	 * @return the username (never <code>null</code>)  
	 * @author:	azzcsimp
	 * @Createdate:	2014年12月16日 下午3:34:48
	 */
	String getUsername();
	
	/**
	 * 返回用户唯一编号
	 * @return 用户唯一编号
	 * @author:	azzcsimp
	 * @Createdate:	2014年12月16日 下午3:35:55
	 */
	String getId();
	
	/**
	 * Indicates whether the user's account has expired. 
	 * An expired account cannot be authenticated.
	 * @return <code>true</code> if the user's account is valid (ie non-expired), 
	 * 		   <code>false</code> if no longer valid (ie expired)
	 */
	boolean isAccountNonExpired();
	
	/**
	 * Indicates whether the user is locked or unlocked. 
	 * A locked user cannot be authenticated.
	 * 
	 * @return <code>true</code> if the user is not locked, 
	 * 		   <code>false</code> otherwise
	 */
	boolean isAccountNonLocked();
	
	/**
	 * Indicates whether the user's credentials (password) has expired. 
	 * Expired credentials prevent authentication.
	 * 
	 * @return <code>true</code> if the user's credentials are valid (ie non-expired), 、
	 * 		   <code>false</code> if no longer valid (ie expired)
	 */
	boolean isCredentialsNonExpired();

	/**
	 * Indicates whether the user is enabled or disabled. 
	 * A disabled user cannot be authenticated.
	 * 
	 * @return <code>true</code> if the user is enabled, 
	 * 		   <code>false</code> otherwise
	 */
	boolean isEnabled();

}
